home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-10-26 | 2.5 KB | 60 lines | [TEXT/ScoM] |
- SPREADING ZONES WITH FIT-TO-SHEET
-
- > Pan (list (gen-cresc-dim 1 127 32)) ; restarted each
- >zone
-
- You can use distribute to span material on several zones. You can also
- use fit-to-sheet, which fits a vector onto all zones of a section, and
- this case the (sheetlen) returns the number of elements needed. It
- calculates how many length units are needed to equal the sum of all
- zones of a section. Fit-to-sheet then cuts the vector values
- into equal sizes sublists.
-
- crystalcnt
- channel 9
- symbol '(=)
- velocity '(0)
- length '(1/16-3)
- controller (mu80-controllers
- attact-time (fit-to-sheet (vector-round 72 87 (gen-sin 10 1 (sheetlen) 90)))
- filter (fit-to-sheet (vector-round 57 80 (gen-sin 9 1 (sheetlen) 90)))
- volume (fit-to-sheet (vector-round 50 60 (gen-sin 3 1 (sheetlen)))))
-
- These functions are defined here. It shows you how to calculate spreadings
- like this. Fit-to-sheet calls symbol-divide to cut the material into pieces.
-
- (defun fit-to-sheet (v)
- (let* ((zones (get-value-or-default 'zone *current-instrument* *current-section*))
- (zone-unit (abs (get-tick (car zones))))
- (length-unit (get-tick
- (car (get-value-or-default 'length
- *current-instrument*
- *current-section*))))
- (values-per-zone (truncate (/ zone-unit length-unit))))
- (symbol-divide values-per-zone nil nil (vector-to-list v))))
-
- (defun sheetlen ()
- (roundup
- (/ (make-zone (get-value-or-default 'zone *current-instrument* *current-section*))
- (get-tick (car (get-value-or-default 'length *current-instrument* *current-section*))))))
-
-
- >; Peter: Why I can not define a controller list to go across zones as the
- >following lines?
- >; (I can do it with symbols and lengths...see velocity...)
- >; Pan '(64 34 56 12)
- >; Pan (gen-cresc-dim 1 127 30)
- >
- >
- > )
- > groove '(0)
- > tuning '((0))
- > )
-
- There is a historical reason. During its first 5 years Symbolic Composer
- could not at all process controllers. The way they were implemented
- reflected the way it was possible to patch them into the compiler. Then
- it took a couple of more years to evolve the concept of distribution.
- So at the time controllers were implemented it was impossible to
- realize lists that go across zones that way.
-